.class public Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;
.super Lcom/brixd/niceapp/callback/BaseDetailCommentShareCallback;
.source "CommunityDetailCommentShareCallback.java"


# instance fields
.field private mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

.field private mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/brixd/niceapp/model/BaseAppModel;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "appModel"    # Lcom/brixd/niceapp/model/BaseAppModel;

    .prologue
    .line 17
    invoke-direct {p0}, Lcom/brixd/niceapp/callback/BaseDetailCommentShareCallback;-><init>()V

    .line 18
    iput-object p1, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mContext:Landroid/content/Context;

    .line 19
    iput-object p2, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    .line 20
    return-void
.end method


# virtual methods
.method public onShare(Lcn/sharesdk/framework/Platform;Lcn/sharesdk/framework/Platform$ShareParams;)V
    .registers 11
    .param p1, "platform"    # Lcn/sharesdk/framework/Platform;
    .param p2, "paramsToShare"    # Lcn/sharesdk/framework/Platform$ShareParams;

    .prologue
    const/4 v7, 0x0

    .line 24
    invoke-virtual {p2}, Lcn/sharesdk/framework/Platform$ShareParams;->getText()Ljava/lang/String;

    move-result-object v2

    .line 25
    .local v2, "shareStr":Ljava/lang/String;
    const-string v4, "#\u53d1\u73b0\u5e94\u7528#"

    .line 26
    .local v4, "theme":Ljava/lang/String;
    invoke-virtual {p0, v4}, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->getAcceptSinaWeiboSize(Ljava/lang/String;)I

    move-result v1

    .line 28
    .local v1, "acceptSinaWeiboSize":I
    const-string v5, "SinaWeibo"

    invoke-virtual {p1}, Lcn/sharesdk/framework/Platform;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_90

    .line 29
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "//"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget-object v6, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v6}, Lcom/brixd/niceapp/model/BaseAppModel;->getTitle()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 31
    .local v3, "suffix":Ljava/lang/String;
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v5

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v6

    sub-int v6, v1, v6

    if-le v5, v6, :cond_5b

    .line 32
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v6

    sub-int v6, v1, v6

    add-int/lit8 v6, v6, -0x3

    invoke-virtual {v2, v7, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "..."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 35
    :cond_5b
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "@\u6700\u7f8e\u5e94\u7528\u5b98\u65b9\u5fae\u535a "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget-object v6, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v6}, Lcom/brixd/niceapp/model/BaseAppModel;->getId()I

    move-result v6

    const-string v7, "weibo"

    invoke-static {v6, v7}, Lcom/brixd/niceapp/util/ShareUtils;->getCommunityShareUrl(ILjava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 50
    .end local v3    # "suffix":Ljava/lang/String;
    :cond_8c
    :goto_8c
    invoke-virtual {p2, v2}, Lcn/sharesdk/framework/Platform$ShareParams;->setText(Ljava/lang/String;)V

    .line 51
    return-void

    .line 36
    :cond_90
    sget-object v5, Lcn/sharesdk/tencent/qzone/QZone;->NAME:Ljava/lang/String;

    invoke-virtual {p1}, Lcn/sharesdk/framework/Platform;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_8c

    .line 37
    iget-object v5, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getTitle()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p2, v5}, Lcn/sharesdk/framework/Platform$ShareParams;->setTitle(Ljava/lang/String;)V

    .line 38
    iget-object v5, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getId()I

    move-result v5

    const-string v6, "qzone"

    invoke-static {v5, v6}, Lcom/brixd/niceapp/util/ShareUtils;->getCommunityShareUrl(ILjava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p2, v5}, Lcn/sharesdk/framework/Platform$ShareParams;->setTitleUrl(Ljava/lang/String;)V

    .line 39
    iget-object v5, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mContext:Landroid/content/Context;

    const v6, 0x7f0c0011

    invoke-virtual {v5, v6}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p2, v5}, Lcn/sharesdk/framework/Platform$ShareParams;->setSite(Ljava/lang/String;)V

    .line 40
    iget-object v5, p0, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getId()I

    move-result v5

    const-string v6, "qzone"

    invoke-static {v5, v6}, Lcom/brixd/niceapp/util/ShareUtils;->getCommunityShareUrl(ILjava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p2, v5}, Lcn/sharesdk/framework/Platform$ShareParams;->setSiteUrl(Ljava/lang/String;)V

    .line 42
    invoke-virtual {p0, v4}, Lcom/brixd/niceapp/callback/CommunityDetailCommentShareCallback;->getAcceptQZoneSize(Ljava/lang/String;)I

    move-result v0

    .line 43
    .local v0, "acceptQZoneSize":I
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v5

    if-le v5, v0, :cond_f2

    .line 44
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    add-int/lit8 v6, v0, -0x3

    invoke-virtual {v2, v7, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "..."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 47
    :cond_f2
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto :goto_8c
.end method
